The present invention relates to a spanning tree bridge and a route change method using the bridge. In particularly, the present invention relates to a spanning tree bridge employed in a network containing a redundant route caused by a plurality of bridges and a route change method using the bridge.
In a network containing a redundant route caused by a plurality of bridges, a spanning tree protocol is employed for determining a route.
For example, as shown in FIG. 7, assume a network over which LAN 1 and LAN 2 are connected to each other by means of a bridge A.
Here, in the case of a network over which node “n1” such as personal computer is connected to LAN 1, and HUB 1 is connected to LAN 2, packets transmitted from the node “n1” are transmitted to all nodes of a broadcast domain including node “n2” such as personal computer connected to the HUB 1 via LAN 1→bridge A→LAN 2→HUB 1.
Over such network, when HUB 2 is connected to LAN 1 and LAN 2 in parallel to bridge A, a packet transmitted from the node “n1” loops over the network like LAN 1→bridge A→LAN 2→HUB 2→LAN 1→bridge A→LAN 2→HUB 2. As a result, a packet cannot be transmitted from a node other than node “n1” (node in a broadcast domain other than node “n1”).
In the case where a network is configured by only bridge A and HUB 1 as shown in FIG. 7, a spanning tree is employed to prevent a packet transmitted from a node from looping over the network.
In addition, as shown in FIG. 8, in the case where two bridges A and B are connected in parallel between LAN 1 to which node “n1” such as personal computer is connected and LAN 2 to which HUB 1 is connected, thereby making communication among nodes “n2”, “n3”, “n4”, . . . such as personal computers connected to node “n1” and HUB 1, one bridge is generally used to make communication. When this bridge A is linked down, the other bridge B is used to make communication, whereby a spanning tree is employed in order to cause a network to provide redundancy.
Here, basic algorithm and protocol of the spanning tree consists of the following items (1) to (5) (Refer to ISO/IEC 15802-3: 1998 (E) ANSI/IEEE Std 802. 1D, 1998 Edition, LOCAL AND METROPOLITAN AREA NETWORKS: MEDIA ACCESS CONTROL (MAC) BRIDGES, pp. 58-75, 8. the Spanning Tree Algorithm and Protocol).
(1) A special frame called Configuration Bridge Protocol Data Units (hereinafter, referred to as BPDU) is exchanged between bridges.
The following works are performed based on this exchanged BPDU.
(2) A network root bridge is selected.
Only one root bridge exists in the entire LAN bridge connected.
(3) Each bridge computes the shortest route that reaches a root bridge (A port that provides the shortest route to the root bridge is called a root port).
(4) With respect to each LAN, a “designated bridge” is selected from a bridge connected to the LAN.
(5) Each bridge selects a port (designated port) that belongs to a spanning tree and a port (blocked port) that does not belong to such spanning tree.
All data frames received at a blocked port are discarded.
In addition, frame transmission from a blocked port is not performed at all.
A received BPDU is not forwarded at all.
A data portion of the above mentioned BPDU includes at least root ID, bridge ID, and root path cost.
Root ID is an ID of a root bridge (or a bridge assumed to be such root bridge), and is generated based on a MAC address of such bridge and a priority designated by an administrator.
Bridge ID is an ID of a bridge that transmits a BPDU, and is generated based on a MAC address of such bridge and a priority designated by an administrator.
A root path cost is a cost of the (possible) shortest route from a bridge that transmits a BPDU to a root bridge.
In an initial state (when a power is supplied), each bridge is a root bridge itself, and it is assumed that a root path cost is 0.
Each bridge transmits the initial value of a BPDU to all ports, and at the same time, receives the BPDU transmitted from another bridge from all the ports.
In the case where a bridge has received a better BPDU from a port, such bridge stops transmission of BPDU to that port, and then, changes the value of the BPDU to be transmitted by the bridge itself.
In this manner, in the case where a spanning tree enters a stable state, only one bridge transmits a BPDU among each LAN.
For example, in the case where BPDU 1 and BPDU 2 are present, it is judged which of the above BPDUs is better in accordance with rules (1) to (4) below.
(1) In the case where root ID of BPDU 1 is numerically smaller than that of BPDU 2, it is judged that BPDU 1 is better than BPDU 2.
(2) In the case where root ID of BPDU 1 is numerically equal to that of BPDU 2, if a root path cost of BPDU 1 is smaller than that of BPDU 2, it is judged that BPDU 1 is better than BPDU 2.
(3) In the case where root ID of BPDU 1 is numerically equal to that of BPDU 2, and a root path cost of BPDU 1 is equal to that of BPDU 2, if bridge ID of BPDU 1 is numerically smaller than that of BPDU 2, it is judged that BPDU 1 is better than BPDU 2.
(4) In the case where root ID of BPDU 1 is numerically equal to that of BPDU 2, a root path cost of BPDU 1 is equal to that of BPDU 2, and bridge ID of BPDU 1 is numerically equal to that of BPDU 2, if port ID of BPDU 1 is smaller than that of BPDU 2, it is judged that BPDU 1 is better than BPDU 2.
Then, each bridge compares the initial value of its own BPDU with that of the BPDU from another bridge received from all ports, and selects root ID from the best BPDU.
Next, each bridge computes its own root path cost in accordance with (root path cost)=(root path cost in the best BPDU)+path cost.
A path cost is a cost to the root that each port individually has, and the value of the cost can be set by an administrator.
Once a root ID, a root port, and a root path cost are defined, each bridge updates the content of BPDU transmitted by such each bridge itself.
Further, its own updated BPDU is compared with BPDU received from a port other than root port, and it is judged whether or not each port other than root port is a designated bridge itself.
A port that is a designated bridge is called a designated port, and a port that is not a designated bridge is called a blocked port.
In BPDU transmission and data frame forwarding to a root port, a designated port and a blocked port, a data frame is forwarded at the root port without transmitting BPDU; BPDU is transmitted, and a data frame is forwarded at the designated port; and BPDU is not transmitted, and a data frame is not forwarded at the blocked port.
In this manner, once a spanning tree is configured, each bridge performs regular operations described in (1) to (4) below.
These regular operations are required for reconfiguring a spanning tree that has been configured due to a bridge fault or addition of new bridge.
(1) BPDU includes an element called “message age”.
This value denotes an elapsed time after a root bridge has generated a BPDU that corresponds to the above BPDU.
(2) A root bridge transmits its own BPDU periodically to all ports. At this time, “message age” is set to 0.
(3) Each bridge stores a received BPDU, and increases the value of the “message age” of the BPDU stored in each port with an elapse of time (message age timer).
(4) A bridge other than root bridge transmits its own BPDU when it receives a BPDU from a root port.
At this time, as a value of the “message age”, there is used a value equal to or greater than the “message age” of the root port and greater than the “message age” of the received BPDU.
Here, the reconfiguration of the spanning tree occurs in any of the cases described in (1) and (2) below.
(1) In the case where the “message age” timer of the stored BPDU times out (in the case where a max age is exceeded); or
(2) In the case where a BPDU better than that stored in a port or a BPDU with the small value of the message age is received from the same port.
In the case where any of the above events occurs, a bridge performs re-computation for a root ID, a root cost, and a root port.
In the meantime, it is very dangerous to perform data frame transmission before all the bridges over a network enters a normal state after configuration (reconfiguration) of a spanning tree has been started.
This is because there is a possibility that a temporary loop occurs during spanning tree configuration.
Therefore, even if each bridge determines its own designated port, it does not start data frame forwarding immediately.
There are three types of the states of each port in a bridge:
(1) listening: No work concerning a data frame is carried out.
(2) learning: Although the learning of a starting MAC address is performed, forwarding is not performed.
(3) forwarding: Data frame forwarding is performed.
The lengths of the listening state and learning state are called a “forward delay”. A root bridge determines its value, enters its value in a BPDU, and transmits the fact to each bridge.
In addition, a timer employed in the listening state and learning state is called a “forwarding timer”.
If spanning tree reconfiguration occurs, a host position changes, and the contents of an old learning table may be incorrect.
Thus, the bridge corresponding to a spanning tree has two kinds of states as timeout values of the learning table aging timer as follows.
(1) Normal value: This value is set to a long time such as a few minutes.
(2) A value used after topology change: This value is the same as the forward delay value.
When a bridge senses spanning tree reconfiguration, the timeout value of the learning table aging timer is set to a value identical to forward delay for a predetermined period of time.
In the meantime, a spanning tree algorithm and protocol has a system that notifies to all bridges that spanning tree reconfiguration has occurred.
(1) When a bridge senses a topology change, that bridge transmits a frame called TCN-BPDU (Topology Change Notification BPDU) to a root port with hello time intervals.
This transmission is continued until a BPDU in which a TCA (Topology Change Acknowledgment) flag is set has been received from the root port.
(2) A bridge which has received TCN-BPDU also transmits TCN-BPDU to its own root port.
On the other hand, to a port that has received a TCN-BPDU, a BPDU TCA flag is set, and a BPDU is transmitted during transmission of the next BPDU.
(3) In the case where a root bridge receives a TCN-BPDU or the state of its own port changes, the root bridge transmits a BPDU in which a TC (Topology Change) flag is set from that time to a max age + forward delay time.
(4) A bridge which has received the TC flag set BPDU from a root port sets a TC flag for its own BPDU, and transmits such BPDU.
This transmission is continued until a BPDU in which a TC flag is not set has been received.
(5) While a bridge receives TC flag set BPDU from the root port, the bridge uses the value of “forward delay” as a timeout value of the learning table aging timer.
In this way, a spanning tree has an algorithm for automatically removing a loop in a redundant bridge network, and automatically sensing a network topology change caused by a device fault or cable failure, thereby automatically changing a network topology so as to prevent a loop from being produced.
In the meantime, such spanning tree works so as not to form a loop in a network. However, in the case where a root port is linked down for any reason (such as cable reconnection, invalid port setting or communication route change caused by a communication failure, for example), an operation for restoring a blocked port that has stopped and reconfiguring a spanning tree is executed.
FIG. 9 shows an example of a network describing such operation.
In the network shown in FIG. 9, assume that three bridges A, B and C are connected to each other, and a spanning tree is configured so that, in a normal state, communication can be made when bridge A is defined as a root bridge, bridge B is defined as a representative bridge, and a port of bridge C oriented to the bridge B is defined as a blocked port.
With respect to the nodes connected to each bridge, only portions required for illustration is illustrated, and the other portion is omitted.
In the network shown in FIG. 9, in the case of making communication between node “n1” connected to bridge B and node “n2” connected to bridge C, a signal from the node “n1” of bridge B is transmitted to node “n2” of bridge C through bridges A and C.
If communication is disabled between bridges A and B for any reason, communication between node “n1” connected to bridge B and node “n2” connected to bridge C is also disabled. Thus, it is required to open a blocked port of bridge C, and change a communication route, thereby reconfiguring a spanning tree.
In a conventional spanning tree, if communication is disabled between bridges A and B, bridge B does not receive a BPDU periodically transmitted from bridge A that is a root bridge.
In this manner, when bridge B does not receive the BPDU for a predetermined time, bridge B detects a network failure relevant to bridge A.
When bridge B detects a network failure, a BPDU is not transmitted from bridge B to bridge C.
In this manner, bridge C does not receive a BPDU essentially transmitted via bridges A and B.
When bridge C starts an operation for gradually opening a blocked port so as to enable communication between bridges B and C after an elapsed time from a time when a BPDU is not received from bridge B has elapsed a predetermined designated time.
When a blocked port of bridge C fully opens, communication between a node connected to bridge B and a node connected to bridge C is enabled.
However, in such conventional technique of reconfiguring a spanning tree, there has been a problem that, after a network failure has been detected, a certain time is required for opening such blocked port to enable communication between node “n1” connected to bridge B and node “n2” connected to bridge C; and restoration from a communication interrupt is slow, which causes lowered communication efficiency.